gusucode.com > 酷维企业网站CMS管理系统 v2.1.0 > 酷维企业网站CMS管理系统 v2.1.0\code\NewsAdmin\newsup2.asp

    <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp" -->
<!--#include file="pass.asp" -->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
	color: #000000;
}
a {
	font-size: 12px;
	color: #FF0000;
}
a:visited {
	color: #000000;
	text-decoration: none;
}
a:hover {
	color: #0000FF;
	text-decoration: underline;
}
a:link {
	text-decoration: none;
	color: #000000;
}
a:active {
	text-decoration: none;
}
-->
</style></head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="24" align="center"><% 
	set rs=server.createobject("adodb.recordset") 
sql="select * from nlei"
rs.open sql,conn,1 
while not rs.eof 
%>
<a href="newsup.asp?lei=<%= rs("id") %>"><%= rs("nlei") %></a>&nbsp;&nbsp;
<% rs.movenext
wend  %>

</td>
  </tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bordercolor="#ECE9D8" bgcolor="#5C85D6">
  <tr>
    <td height="30" colspan="6" align="center" background="images/admin_bg_1.gif"><b><font color="#FFFFFF">文章管理</font></b></td>
  </tr>
<%
lei=request("lei")
if lei="" then
sql="select * from news order by id desc"
else
sql="select * from news  where mytype="&lei&" order by id desc"
end if 
set rs=server.createobject("adodb.recordset") 
rs.open sql,conn,1
rs.pagesize=15 '每页显示多少条
pagecount=rs.pagecount '总页数

%>        <%
if rs.bof and rs.eof then
response.write "没有文章"
else
	%>
  <tr align="center" bgcolor="#FFFFFF">
    <td width="7%" height="22"><strong>ID</strong></td>
    <td width="53%"><strong>文章标题</strong></td>
    <td width="18%"><strong>添加日期</strong></td>
	<td width="10%"><strong>点击数</strong></td>
    <td width="6%"></td>
    <td width="6%"></td>
  </tr>
	<%				 
page=clng(request.querystring("page"))
if page<1 then page=1
if page>rs.pagecount then page=rs.pagecount
rs.absolutepage=page  '跳到多少页
  
for i=1 to rs.pagesize
%>
  
  <tr>
    <td height="22" align="center" bgcolor="#FFFFFF"><%= rs("id") %></td>
    <td bgcolor="#FFFFFF">&nbsp;<a  href="newsgai.asp?id=<%= rs("id") %>"><%= rs("bt") %></a></td>
    <td align="center" bgcolor="#FFFFFF"><%= rs("riqi") %></td>
	<td align="center" bgcolor="#FFFFFF"><%= rs("lls") %></td>
    <td align="center" bgcolor="#FFFFFF"><a  href="newsgai.asp?id=<%= rs("id") %>">修改</a></td>
    <td align="center" bgcolor="#FFFFFF"><a  href="news.asp?del=<%= rs("id") %>">删除</a></td>
  </tr>
          <% 
rs.movenext
if rs.eof then exit for 
next
end if 
%>
  
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="27" align="center">&nbsp;&nbsp;&nbsp; 
      <%
	r=7
	 
	'总页数
	zys=round(clng(rs.pagecount)/r+0.5)
	
	'当前页数
	dqys=request.QueryString("dqys") 
	
	'开始页
	ksy=request.QueryString("ksy") 
	
	if dqys="" then dqys=1
	if ksy="" then ksy=1 
	 
	js=clng(dqys) * r '一个FOR语句结束
	if js > clng(rs.pagecount) then js=clng(rs.pagecount)
	
	newksy= clng(dqys)*r-(r-1) '一个FOR语句开始
		
if clng(dqys) >1 then response.write "<a href=?dqys="& dqys-1 &"&lb="& lb &">" &"上一页" &"</a>"

	  for t=newksy to js
	     response.write "<a href=?page=" &t&"&dqys="&dqys&"&lb="& lb &">[" &t& "]</a>&nbsp;"
	  next
	  

if cdbl(dqys)< zys then response.write "<a href=?dqys="& dqys+1 &"&lb="& lb &">" &"下一页" &"</a>"

	%></td></tr>
</table>
<table width="556" border="0" cellspacing="0" cellpadding="0">
<form name="ff1" method="post" action="addClick.asp">
  <tr>
    <td>
点击率增加数:<input name="click" size="8" />
<input type="submit" value="提交" style="font-size:9pt;padding-top:2px;">
	</td>
  </tr>
</form>
</table><!--#include file="boom.asp" -->
</body>
</html>